word = 'hello backpackerxl hello hi are you ok ok ha ha ha are backpackerxl '


def getWord(word):
    word_count = {}
    words = ''
    for i in word:
        if i != ' ':
            words += i
        else:
            if words not in word_count:
                word_count[words] = 0
            for tag in word_count:
                if words == tag:
                    word_count[tag] += 1
                    break
            words = ''
            continue
    return word_count


print(getWord(word))
